import javax.swing.JLabel;

public class GUIAgent implements Runnable {
	private int x,y;
	private int moves;
	private JLabel agentLabel;
	private JLabel movesLabel;
	private final int pixelSize;
	
	public GUIAgent(JLabel agentLabel, JLabel movesLabel, int pixelSize) {
		this.agentLabel=agentLabel;
		this.movesLabel=movesLabel;
		this.pixelSize=pixelSize;
		this.moves=0;
	}
	
	public void update(int x, int y, int moves) {
		this.x=x;
		this.y=y;
		this.moves=moves;
	}
	
	public void run() {
		agentLabel.setBounds(x * pixelSize, y * pixelSize, pixelSize, pixelSize);
		movesLabel.setText("moves: " + moves);
		agentLabel.repaint();
		movesLabel.repaint();
	}
	
	

}
